package com.csweimei.rentmanagementtreasure.http.entity;

import com.csweimei.rentmanagementtreasure.base.AppConfig;
import com.csweimei.rentmanagementtreasure.utils.ValidateUtils;
import com.google.gson.annotations.SerializedName;

import java.util.List;

public class LeaseDetailBean extends BaseResult{
    @SerializedName("data")
    private DataDTO data;

    public DataDTO getData() {
        return data;
    }

    public void setData(DataDTO data) {
        this.data = data;
    }

    public static class DataDTO {
        @SerializedName("id")
        private int id;
        @SerializedName("stime")
        private String stime;
        @SerializedName("etime")
        private String etime;
        @SerializedName("depostit")
        private String depostit;
        @SerializedName("payMethod")
        private String payMethod;
        @SerializedName("customID")
        private int customID;
        @SerializedName("customImg")
        private String customImg;
        @SerializedName("sex")
        private String sex;
        @SerializedName("name")
        private String name;
        @SerializedName("contact")
        private String contact;
        @SerializedName("houserID")
        private int houserID;
        @SerializedName("category")
        private String category;
        @SerializedName("houserType")
        private String houserType;
        @SerializedName("Imgsrc")
        private String imgsrc;
        @SerializedName("quarters")
        private String quarters;
        @SerializedName("Address")
        private String address;
        @SerializedName("roomname")
        private String roomname;
        @SerializedName("rent")
        private String rent;
        @SerializedName("roomDetails")
        private List<RoomDetailsDTO> roomDetails;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getStime() {
            return ValidateUtils.getTimeFormYMD(stime);
        }

        public void setStime(String stime) {
            this.stime = stime;
        }

        public String getEtime() {
            return ValidateUtils.getTimeFormYMD(etime);
        }

        public void setEtime(String etime) {
            this.etime = etime;
        }

        public String getDepostit() {
            return depostit;
        }

        public void setDepostit(String depostit) {
            this.depostit = depostit;
        }

        public String getPayMethod() {
            return payMethod;
        }

        public void setPayMethod(String payMethod) {
            this.payMethod = payMethod;
        }

        public int getCustomID() {
            return customID;
        }

        public void setCustomID(int customID) {
            this.customID = customID;
        }

        public String getCustomImg() {
            return customImg;
        }

        public void setCustomImg(String customImg) {
            this.customImg = customImg;
        }

        public String getSex() {
            return sex;
        }

        public void setSex(String sex) {
            this.sex = sex;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getContact() {
            return contact;
        }

        public void setContact(String contact) {
            this.contact = contact;
        }

        public int getHouserID() {
            return houserID;
        }

        public void setHouserID(int houserID) {
            this.houserID = houserID;
        }

        public String getCategory() {
            return category;
        }

        public void setCategory(String category) {
            this.category = category;
        }

        public String getHouserType() {
            return houserType;
        }

        public void setHouserType(String houserType) {
            this.houserType = houserType;
        }

        public String getImgsrc() {
            if (imgsrc.contains(",")){
                return imgsrc.split(",")[0];
            }else {
                return imgsrc;
            }
        }

        public void setImgsrc(String imgsrc) {
            this.imgsrc = imgsrc;
        }

        public String getQuarters() {
            return quarters;
        }

        public void setQuarters(String quarters) {
            this.quarters = quarters;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public String getRoomname() {
            return roomname;
        }

        public void setRoomname(String roomname) {
            this.roomname = roomname;
        }

        public String getRent() {
            return rent;
        }

        public void setRent(String rent) {
            this.rent = rent;
        }

        public List<RoomDetailsDTO> getRoomDetails() {
            return roomDetails;
        }

        public void setRoomDetails(List<RoomDetailsDTO> roomDetails) {
            this.roomDetails = roomDetails;
        }

        public static class RoomDetailsDTO {
            @SerializedName("leaseid")
            private int leaseid;
            @SerializedName("rid")
            private int rid;
            @SerializedName("uname")
            private String uname;
            @SerializedName("rent")
            private String rent;
            @SerializedName("paytype")
            private String paytype;
            @SerializedName("roomname")
            private String roomname;
            @SerializedName("phone")
            private String phone;
            @SerializedName("deposit")
            private String deposit;
            @SerializedName("staeTime")
            private String staeTime;
            @SerializedName("endTime")
            private String endTime;

            public int getLeaseid() {
                return leaseid;
            }

            public void setLeaseid(int leaseid) {
                this.leaseid = leaseid;
            }

            public int getRid() {
                return rid;
            }

            public void setRid(int rid) {
                this.rid = rid;
            }

            public String getUname() {
                return uname;
            }

            public void setUname(String uname) {
                this.uname = uname;
            }

            public String getRent() {
                return rent;
            }

            public void setRent(String rent) {
                this.rent = rent;
            }

            public String getPaytype() {
                return paytype;
            }

            public void setPaytype(String paytype) {
                this.paytype = paytype;
            }

            public String getRoomname() {
                return roomname;
            }

            public void setRoomname(String roomname) {
                this.roomname = roomname;
            }

            public String getPhone() {
                return phone;
            }

            public void setPhone(String phone) {
                this.phone = phone;
            }

            public String getDeposit() {
                return deposit;
            }

            public void setDeposit(String deposit) {
                this.deposit = deposit;
            }

            public String getStaeTime() {
                return staeTime;
            }

            public void setStaeTime(String staeTime) {
                this.staeTime = staeTime;
            }

            public String getEndTime() {
                return endTime;
            }

            public void setEndTime(String endTime) {
                this.endTime = endTime;
            }
        }
    }
}
